package Scene5;

import Picture.GameImage;

import java.awt.image.BufferedImage;

public class Ice5 {

    int speed = 0;
    int x = 2800;
    int y = 900;
    JumpAnimal jumpAnimal;
    BufferedImage img = GameImage.get( "/Picture/movept.png");
    int w = img.getWidth();
    int h = img.getHeight();
    public Ice5(JumpAnimal jumpAnimal){
        this.jumpAnimal = jumpAnimal;

    }

    public void move(){
        if(jumpAnimal.x-this.x <this.w&&jumpAnimal.x-this.x>0){
            speed = 0;
        }



        if(jumpAnimal.y==jumpAnimal.groundY){
            speed = 0;
        }
        x-=speed/2;
    }
    public void  reOpen(){
        speed = 0;
        x = 2800;
        y = 900;
    }
}
